package com.zjp.birthdaymanager.database;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.zjp.birthdaymanager.R;

import java.math.MathContext;

/**
 * Created by Administrator on 2016/4/22.
 */
public class DataBaseHelper extends SQLiteOpenHelper {
    private String sqlCreate = "create table if not exists birth(_id integer primary key autoincrement," +
            "name text not null,birthdate text not null,phone text,remark text)";

    public DataBaseHelper(Context context, String name){
        super(context, name, null, 1);

    }

    public DataBaseHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(sqlCreate);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
